using System.ComponentModel.DataAnnotations;

namespace RAG.Domain.Entities.App;

/// <summary>
/// 权限实体
/// </summary>
public class Permission : EntityBase
{
    public Guid Id { get; set; }
    
    [StringLength(100, ErrorMessage = "权限代码长度不能超过100个字符")]
    public string PermissionCode { get; set; } = null!; // 权限代码
    
    [StringLength(100, ErrorMessage = "权限名称长度不能超过100个字符")]
    public string PermissionName { get; set; } = null!; // 权限名称
    
    [StringLength(200, ErrorMessage = "权限描述长度不能超过200个字符")]
    public string? PermissionDescription { get; set; } // 权限描述
    
    // 导航属性
    public ICollection<Role> Roles { get; set; } = new List<Role>();
} 